package com.tdh.service;

import com.tdh.dao.TsBzdmMapper;
import com.tdh.pojo.TsBzdm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
@Slf4j
public class TsBzdmService {

    private List<TsBzdm> identityList;

    private List<TsBzdm> areaList;

    @Autowired
    private TsBzdmMapper tsBzdmMapper;

    @Transactional
    @PostConstruct
    public void init() {

        identityList = tsBzdmMapper.queryIdentity();
        areaList = tsBzdmMapper.queryArea();

        log.debug("Ts_Bzdm：涉案身份、国家或地区: " + identityList + areaList);
    }

    public List<TsBzdm> queryIdentity() {
        return identityList;
    }

    public List<TsBzdm> queryArea() {
        return areaList;
    }
}
